package 多次撤销;

import java.util.ArrayList;

/**
 * @author 赵希奥
 * @date 2022/4/20 23:29
 * @gitHub https://github.com/CKXGZXA
 * @gitee https://gitee.com/ckxgzxa
 * @description:
 * 象棋棋子备忘录管理类, 充当负责人
 */
public class MementoCaretaker {
    private ArrayList<ChessmanMemento> mementolist = new ArrayList<>();

    public ChessmanMemento getMemento(int i) {
        return (ChessmanMemento) mementolist.get(i);
    }

    public void setMemento(ChessmanMemento memento) {
        this.mementolist.add(memento);
    }
}
